package com.bwie.config;

import org.apache.kafka.clients.admin.NewTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 军哥
 * @version 1.0
 * @description: TODO
 * @date 2024/11/19 15:51
 */

@Configuration
public class KafkaConfig {

    @Bean
    public NewTopic testTopic(){
        return new NewTopic("topic-test", 1, (short) 1);
    }

    /**
     * 商品消息主题
     * @return
     */
    @Bean
    public NewTopic testTopic2(){
        return new NewTopic("topic-prod", 1, (short) 1);
    }

}
